#include <stdio.h>

int main()
{
	int a[5][5];
	for ( int i = 0; i < 5; i++ ) {
		for ( int j = 0; j < 5; j++ ) {
			scanf("%d", &a[i][j]);
		}
	}
	
	int b[5];
	int cnt = 0;
	for ( int i = 0; i < 5; i++ ) {
		int saddleLine = i;
		int saddleCol = 0;
		for ( int j = 1; j < 5; j++ ) {
			if ( a[saddleLine][saddleCol] < a[i][j] ) {
				saddleLine = i;
				saddleLine = j;
			}
		}
		
		
	}
	return 0;
}
